package com.cliff.joinus.dataobject;

public class MusicItem extends MediaItem {
	public String title = null;	
	public String displayName = null;		
	public String album = null;		
	public String artist = null;		
	public long duration = 0;
	
	public String getDuration() {
		long playTime = duration / 1000;
		return String.format("%d:%02d", (playTime/60), (playTime%60)); 				
	}
	
	public String getDisplayName() {
		if (null != title)
			return title;
		
		if (null != displayName)
			return displayName;
		
		return "";
	}
	
	public String getArtist() {
		return (null == artist)?"":artist;
	}
}
